﻿<UserControl x:Class="TouchToolkit.Framework.UI.GestureRecordingPanel"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             Height="233" Width="300" HorizontalAlignment="Right">

    <Grid x:Name="LayoutRootGrid" Background="LightYellow">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="16"/>
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>
            
            <TextBlock Background="LightGray" FontWeight="Bold">Touch Recorder</TextBlock>
            <Grid Grid.Row="1" Margin="1">
                <!--AnonUser-->
                <Grid x:Name="LoginScreenGrid" Visibility="Collapsed" >
                    <StackPanel Orientation="Vertical" Margin="4">
                        <TextBlock Text="Account name:" Margin="3"/>
                        <TextBox x:Name="UserNameTextBox" KeyUp="UserNameTextBox_KeyUp" />
                        <Button x:Name="LoginButton" Content="Login" Margin="5,5" Click="LoginButton_Click" HorizontalAlignment="Right"/>
                    </StackPanel>
                </Grid>

                <!--RegisteredUser-->
                <Grid x:Name="RegisteredUserGrid">
                    <StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Right" Margin="4" Height="20" VerticalAlignment="Top">
                        <TextBlock x:Name="UserNameTextBlock" Text="Account: ?"  TextAlignment="Right"
                           MouseLeftButtonUp="ChangeAccount_MouseLeftButtonUp" Foreground="#FF1A1AE2" Width="60"/>
                    </StackPanel>
                    <TabControl >
                        <TabItem Header="Add New">
                            <StackPanel Orientation="Vertical">
                                <TextBlock Text="Project name:" Height="25" Margin="0,5,0,0"/>
                                <TextBox x:Name="ProjectNameTextBox" Height="25"/>
                                <TextBlock Text="Gesture name:" Height="25" Margin="0,5,0,0"/>
                                <TextBox x:Name="GestureNameTextBox" Height="25" />
                                <Button x:Name="StartRecordingButton" Margin="0,5,0,0"
                                Content="Start Recording" Click="StartRecordingButton_Click" Width="105" HorizontalAlignment="Right" Height="25"/>
                            </StackPanel>
                        </TabItem>

                        <TabItem Header="Existing Gestures">
                            <StackPanel Orientation="Vertical">
                                <TextBlock Text="Project name:" Margin="0,5,5,0"/>
                                <ComboBox x:Name="ExistingProjectNameComboBox" ItemsSource="{Binding ProjectList}" SelectionChanged="ExistingProjectNameComboBox_SelectionChanged" Height="25" VerticalAlignment="Top"/>
                                <TextBlock Text="Gesture name:"  Margin="5,5,5,0"/>
                                <ListBox  SelectionMode="Multiple" x:Name="ExistingGestureNameListBox" ItemsSource="{Binding GestureList}"  Height="70"/>
                                <StackPanel Orientation="Horizontal" Margin="5,5,0,0" >
                                    <TextBlock Margin="0,5">Speed: 1x</TextBlock>
                                    <Slider Height="23" Width="105" Value="5" Margin="0,0,5,0" IsEnabled="False" />
                                <Button x:Name="RunButton" Content="Run" Click="RunButton_Click" Width="60" Height="25" HorizontalAlignment="Right"/>
                                </StackPanel>
                            </StackPanel>
                        </TabItem>

                    </TabControl>
                </Grid>

                <Grid x:Name="LoadingScreen" Visibility="Collapsed">
                    <Rectangle Fill="LightGray" Opacity=".8"/>
                    <TextBlock x:Name="MessageTextBlock" Text="Loading..."  VerticalAlignment="Center" HorizontalAlignment="Center"/>
                </Grid>
            </Grid>
        </Grid>
        
    </Grid>
</UserControl>
